import request from '@/utils/request'

// 查询仓库管理列表
export function listStocks(query) {
  return request({
    url: '/system/stocks/list',
    method: 'get',
    params: query
  })
}

// 查询仓库管理详细
export function getStocks(id) {
  return request({
    url: '/system/stocks/' + id,
    method: 'get'
  })
}

// 新增仓库管理
export function addStocks(data) {
  return request({
    url: '/system/stocks',
    method: 'post',
    data: data
  })
}

// 修改仓库管理
export function updateStocks(data) {
  return request({
    url: '/system/stocks',
    method: 'put',
    data: data
  })
}

// 删除仓库管理
export function delStocks(id) {
  return request({
    url: '/system/stocks/' + id,
    method: 'delete'
  })
}



export function getStocksInfoList(paramName) {
  return request({
    url: '/system/stocks/getStocksInfoList',
    method: 'post',
    data: {paramName}
  })
}

export function stockTreeSelect(paramName) {
  return request({
    url: '/system/stocks/getStocksTree',
    method: 'post',
    data: {paramName}
  })
}
